package com.young.springdemo.service.BuildModelTest;

public abstract class ModelBuilder {

    public Model model = new Model();

    public abstract void buildMenu();

    public abstract void buildPlayList();

    public abstract void buildMainWindow();

    public abstract void buildController();

    public abstract void buildMemoryList();

    public boolean isMain() {
        return false;
    }

    public boolean isSimple() {
        return false;
    }

    public boolean isMemory() {
        return false;
    }

    public Model construct() {
        this.buildMainWindow();

        this.buildController();

        if (isMemory()) {
            this.buildMemoryList();
        }
        if (isMain()) {
            this.buildMenu();
        }
        if (isMain()) {
            this.buildPlayList();
        }
        return model;
    }

}
